<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE BangPatterns, CPP, Rank2Types #-}</span><span>
</span><span id="line-2"></span><span>
</span><span id="line-3"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- Module      : Data.Text.Lazy.Encoding.Fusion</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- Copyright   : (c) 2009, 2010 Bryan O'Sullivan</span><span>
</span><span id="line-6"></span><span class="hs-comment">--</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- License     : BSD-style</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Maintainer  : bos@serpentine.com</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Stability   : experimental</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Portability : portable</span><span>
</span><span id="line-11"></span><span class="hs-comment">--</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- /Warning/: this is an internal module, and does not have a stable</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- API or name. Functions in this module may not check or enforce</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- preconditions expected by public modules. Use at your own risk!</span><span>
</span><span id="line-15"></span><span class="hs-comment">--</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- Fusible 'Stream'-oriented functions for converting between lazy</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- 'Text' and several common encodings.</span><span>
</span><span id="line-18"></span><span>
</span><span id="line-19"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.Text.Internal.Lazy.Encoding.Fusion</span><span>
</span><span id="line-20"></span><span>    </span><span class="hs-special">(</span><span>
</span><span id="line-21"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Streaming</span></span><span>
</span><span id="line-22"></span><span>    </span><span class="hs-comment">--  streamASCII</span><span>
</span><span id="line-23"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#streamUtf8"><span class="hs-identifier">streamUtf8</span></a></span><span>
</span><span id="line-24"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#streamUtf16LE"><span class="hs-identifier">streamUtf16LE</span></a></span><span>
</span><span id="line-25"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#streamUtf16BE"><span class="hs-identifier">streamUtf16BE</span></a></span><span>
</span><span id="line-26"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#streamUtf32LE"><span class="hs-identifier">streamUtf32LE</span></a></span><span>
</span><span id="line-27"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#streamUtf32BE"><span class="hs-identifier">streamUtf32BE</span></a></span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Unstreaming</span></span><span>
</span><span id="line-30"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#unstream"><span class="hs-identifier">unstream</span></a></span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">module</span><span> </span><span class="annot"><a href="Data.Text.Internal.Encoding.Fusion.Common.html"><span class="hs-identifier">Data.Text.Internal.Encoding.Fusion.Common</span></a></span><span>
</span><span id="line-33"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#"><span class="hs-identifier">Data.ByteString.Lazy.Internal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier">ByteString</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#defaultChunkSize"><span class="hs-identifier">defaultChunkSize</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.html#"><span class="hs-identifier">Data.ByteString</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">B</span></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Unsafe.html#"><span class="hs-identifier">Data.ByteString.Unsafe</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">B</span></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Internal.ByteStringCompat.html"><span class="hs-identifier">Data.Text.Internal.ByteStringCompat</span></a></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Internal.Encoding.Fusion.Common.html"><span class="hs-identifier">Data.Text.Internal.Encoding.Fusion.Common</span></a></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Encoding.Error.html"><span class="hs-identifier">Data.Text.Encoding.Error</span></a></span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.html"><span class="hs-identifier">Data.Text.Internal.Fusion</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Step"><span class="hs-identifier">Step</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier">Stream</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html"><span class="hs-identifier">Data.Text.Internal.Fusion.Size</span></a></span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Internal.Unsafe.Char.html"><span class="hs-identifier">Data.Text.Internal.Unsafe.Char</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Unsafe.Char.html#unsafeChr"><span class="hs-identifier">unsafeChr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Unsafe.Char.html#unsafeChr8"><span class="hs-identifier">unsafeChr8</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Unsafe.Char.html#unsafeChr32"><span class="hs-identifier">unsafeChr32</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Internal.Unsafe.Shift.html"><span class="hs-identifier">Data.Text.Internal.Unsafe.Shift</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Unsafe.Shift.html#shiftL"><span class="hs-identifier">shiftL</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Internal.Functions.html"><span class="hs-identifier">Data.Text.Internal.Functions</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Functions.html#unsafeWithForeignPtr"><span class="hs-identifier">unsafeWithForeignPtr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Word.html#"><span class="hs-identifier">Data.Word</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier">Word8</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word16"><span class="hs-identifier">Word16</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier">Word32</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Data.Text.Internal.Encoding.Utf8.html"><span class="hs-identifier">Data.Text.Internal.Encoding.Utf8</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">U8</span></span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Data.Text.Internal.Encoding.Utf16.html"><span class="hs-identifier">Data.Text.Internal.Encoding.Utf16</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">U16</span></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Data.Text.Internal.Encoding.Utf32.html"><span class="hs-identifier">Data.Text.Internal.Encoding.Utf32</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">U32</span></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Unsafe.html"><span class="hs-identifier">Data.Text.Unsafe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IO.Unsafe.html#unsafeDupablePerformIO"><span class="hs-identifier">unsafeDupablePerformIO</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Foreign.ForeignPtr.html#"><span class="hs-identifier">Foreign.ForeignPtr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.ForeignPtr.html#ForeignPtr"><span class="hs-identifier">ForeignPtr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Foreign.Storable.html#"><span class="hs-identifier">Foreign.Storable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Foreign.Storable.html#pokeByteOff"><span class="hs-identifier">pokeByteOff</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#"><span class="hs-identifier">Data.ByteString.Internal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#mallocByteString"><span class="hs-identifier">mallocByteString</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#memcpy"><span class="hs-identifier">memcpy</span></a></span><span class="hs-special">)</span><span class="hs-cpp">
#if defined(ASSERTS)
</span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Control.Exception</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">assert</span><span class="hs-special">)</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-58"></span><span class="hs-keyword">data</span><span> </span><span id="S"><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S"><span class="hs-identifier hs-var">S</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="S0"><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span></span><span>
</span><span id="line-59"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span id="S1"><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S1"><span class="hs-identifier hs-var">S1</span></a></span></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span>
</span><span id="line-60"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span id="S2"><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S2"><span class="hs-identifier hs-var">S2</span></a></span></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span>
</span><span id="line-61"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span id="S3"><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S3"><span class="hs-identifier hs-var">S3</span></a></span></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span>
</span><span id="line-62"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span id="S4"><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S4"><span class="hs-identifier hs-var">S4</span></a></span></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span>
</span><span id="line-63"></span><span>
</span><span id="line-64"></span><span class="hs-keyword">data</span><span> </span><span id="T"><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="T"><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S"><span class="hs-identifier hs-type">S</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span class="hs-comment">-- | /O(n)/ Convert a lazy 'ByteString' into a 'Stream Char', using</span><span>
</span><span id="line-67"></span><span class="hs-comment">-- UTF-8 encoding.</span><span>
</span><span id="line-68"></span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#streamUtf8"><span class="hs-identifier hs-type">streamUtf8</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Encoding.Error.html#OnDecodeError"><span class="hs-identifier hs-type">OnDecodeError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-69"></span><span id="streamUtf8"><span class="annot"><span class="annottext">streamUtf8 :: OnDecodeError -&gt; ByteString -&gt; Stream Char
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#streamUtf8"><span class="hs-identifier hs-var hs-var">streamUtf8</span></a></span></span><span> </span><span id="local-6989586621679108379"><span class="annot"><span class="annottext">OnDecodeError
</span><a href="#local-6989586621679108379"><span class="hs-identifier hs-var">onErr</span></a></span></span><span> </span><span id="local-6989586621679108378"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108378"><span class="hs-identifier hs-var">bs0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(T -&gt; Step T Char) -&gt; T -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108376"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108378"><span class="hs-identifier hs-var">bs0</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#unknownSize"><span class="hs-identifier hs-var">unknownSize</span></a></span><span>
</span><span id="line-70"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-71"></span><span>    </span><span id="local-6989586621679108376"><span class="annot"><span class="annottext">next :: T -&gt; Step T Char
</span><a href="#local-6989586621679108376"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-type">T</span></a></span><span> </span><span id="local-6989586621679108343"><span class="annot"><span class="annottext">bs :: ByteString
</span><a href="#local-6989586621679108343"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679108341"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108341"><span class="hs-identifier hs-var">ps</span></a></span></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span id="local-6989586621679108340"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108340"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-72"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108340"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108338"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf8.html#validate1"><span class="hs-identifier hs-var">U8.validate1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108335"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-73"></span><span>          </span><span class="annot"><span class="annottext">Char -&gt; T -&gt; Step T Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Char
</span><a href="Data.Text.Internal.Unsafe.Char.html#unsafeChr8"><span class="hs-identifier hs-var">unsafeChr8</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108335"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108343"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108340"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-74"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108340"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108338"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf8.html#validate2"><span class="hs-identifier hs-var">U8.validate2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108335"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108331"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-75"></span><span>          </span><span class="annot"><span class="annottext">Char -&gt; T -&gt; Step T Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Char
</span><a href="Data.Text.Internal.Encoding.Utf8.html#chr2"><span class="hs-identifier hs-var">U8.chr2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108335"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108331"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108343"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108340"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-76"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108340"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108338"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf8.html#validate3"><span class="hs-identifier hs-var">U8.validate3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108335"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108331"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108328"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-77"></span><span>          </span><span class="annot"><span class="annottext">Char -&gt; T -&gt; Step T Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Char
</span><a href="Data.Text.Internal.Encoding.Utf8.html#chr3"><span class="hs-identifier hs-var">U8.chr3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108335"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108331"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108328"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108343"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108340"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-78"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108340"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108338"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf8.html#validate4"><span class="hs-identifier hs-var">U8.validate4</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108335"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108331"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108328"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108325"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-79"></span><span>          </span><span class="annot"><span class="annottext">Char -&gt; T -&gt; Step T Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; Char
</span><a href="Data.Text.Internal.Encoding.Utf8.html#chr4"><span class="hs-identifier hs-var">U8.chr4</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108335"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108331"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108328"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108325"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108343"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108340"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-80"></span><span>      </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679108338"><span class="annot"><span class="annottext">len :: Int
</span><a href="#local-6989586621679108338"><span class="hs-identifier hs-var hs-var">len</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="../../bytestring/src/Data.ByteString.html#length"><span class="hs-identifier hs-var">B.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108341"><span class="hs-identifier hs-var">ps</span></a></span><span>
</span><span id="line-81"></span><span>            </span><span id="local-6989586621679108335"><span class="annot"><span class="annottext">a :: Word8
</span><a href="#local-6989586621679108335"><span class="hs-identifier hs-var hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int -&gt; Word8
</span><a href="../../bytestring/src/Data.ByteString.Unsafe.html#unsafeIndex"><span class="hs-identifier hs-var">B.unsafeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108341"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108340"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-82"></span><span>            </span><span id="local-6989586621679108331"><span class="annot"><span class="annottext">b :: Word8
</span><a href="#local-6989586621679108331"><span class="hs-identifier hs-var hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int -&gt; Word8
</span><a href="../../bytestring/src/Data.ByteString.Unsafe.html#unsafeIndex"><span class="hs-identifier hs-var">B.unsafeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108341"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108340"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-83"></span><span>            </span><span id="local-6989586621679108328"><span class="annot"><span class="annottext">c :: Word8
</span><a href="#local-6989586621679108328"><span class="hs-identifier hs-var hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int -&gt; Word8
</span><a href="../../bytestring/src/Data.ByteString.Unsafe.html#unsafeIndex"><span class="hs-identifier hs-var">B.unsafeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108341"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108340"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span>
</span><span id="line-84"></span><span>            </span><span id="local-6989586621679108325"><span class="annot"><span class="annottext">d :: Word8
</span><a href="#local-6989586621679108325"><span class="hs-identifier hs-var hs-var">d</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int -&gt; Word8
</span><a href="../../bytestring/src/Data.ByteString.Unsafe.html#unsafeIndex"><span class="hs-identifier hs-var">B.unsafeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108341"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108340"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-special">)</span><span>
</span><span id="line-85"></span><span>    </span><span class="annot"><a href="#local-6989586621679108376"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span id="local-6989586621679108315"><span class="annot"><span class="annottext">st :: T
</span><a href="#local-6989586621679108315"><span class="hs-identifier hs-var">st</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-type">T</span></a></span><span> </span><span id="local-6989586621679108314"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108314"><span class="hs-identifier hs-var">bs</span></a></span></span><span> </span><span id="local-6989586621679108313"><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679108313"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679108312"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108312"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-86"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679108313"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-87"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S1"><span class="hs-identifier hs-type">S1</span></a></span><span> </span><span id="local-6989586621679108311"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108311"><span class="hs-identifier hs-var">a</span></a></span></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf8.html#validate1"><span class="hs-identifier hs-var">U8.validate1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108311"><span class="hs-identifier hs-var">a</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; T -&gt; Step T Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Char
</span><a href="Data.Text.Internal.Unsafe.Char.html#unsafeChr8"><span class="hs-identifier hs-var">unsafeChr8</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108311"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>    </span><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108310"><span class="hs-identifier hs-var">es</span></a></span><span>
</span><span id="line-88"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S2"><span class="hs-identifier hs-type">S2</span></a></span><span> </span><span id="local-6989586621679108309"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108309"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679108308"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108308"><span class="hs-identifier hs-var">b</span></a></span></span><span>     </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf8.html#validate2"><span class="hs-identifier hs-var">U8.validate2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108309"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108308"><span class="hs-identifier hs-var">b</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; T -&gt; Step T Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Char
</span><a href="Data.Text.Internal.Encoding.Utf8.html#chr2"><span class="hs-identifier hs-var">U8.chr2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108309"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108308"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>     </span><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108310"><span class="hs-identifier hs-var">es</span></a></span><span>
</span><span id="line-89"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S3"><span class="hs-identifier hs-type">S3</span></a></span><span> </span><span id="local-6989586621679108307"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108307"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679108306"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108306"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679108305"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108305"><span class="hs-identifier hs-var">c</span></a></span></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf8.html#validate3"><span class="hs-identifier hs-var">U8.validate3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108307"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108306"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108305"><span class="hs-identifier hs-var">c</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; T -&gt; Step T Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Char
</span><a href="Data.Text.Internal.Encoding.Utf8.html#chr3"><span class="hs-identifier hs-var">U8.chr3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108307"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108306"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108305"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>   </span><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108310"><span class="hs-identifier hs-var">es</span></a></span><span>
</span><span id="line-90"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S4"><span class="hs-identifier hs-type">S4</span></a></span><span> </span><span id="local-6989586621679108304"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108304"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679108303"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108303"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679108302"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108302"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679108301"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108301"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf8.html#validate4"><span class="hs-identifier hs-var">U8.validate4</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108304"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108303"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108302"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108301"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; T -&gt; Step T Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; Char
</span><a href="Data.Text.Internal.Encoding.Utf8.html#chr4"><span class="hs-identifier hs-var">U8.chr4</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108304"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108303"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108302"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108301"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108310"><span class="hs-identifier hs-var">es</span></a></span><span>
</span><span id="line-91"></span><span>        </span><span class="annot"><span class="annottext">S
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108300"><span class="hs-identifier hs-var">consume</span></a></span><span> </span><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108315"><span class="hs-identifier hs-var">st</span></a></span><span>
</span><span id="line-92"></span><span>       </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679108310"><span class="annot"><span class="annottext">es :: T
</span><a href="#local-6989586621679108310"><span class="hs-identifier hs-var hs-var">es</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108314"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108312"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-93"></span><span>    </span><span id="local-6989586621679108300"><span class="annot"><span class="annottext">consume :: T -&gt; Step T Char
</span><a href="#local-6989586621679108300"><span class="hs-identifier hs-var hs-var">consume</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-type">T</span></a></span><span> </span><span id="local-6989586621679108299"><span class="annot"><span class="annottext">bs :: ByteString
</span><a href="#local-6989586621679108299"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679108298"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108298"><span class="hs-identifier hs-var">ps</span></a></span></span><span> </span><span id="local-6989586621679108297"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108297"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679108296"><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679108296"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679108295"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108295"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-94"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108295"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="../../bytestring/src/Data.ByteString.html#length"><span class="hs-identifier hs-var">B.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108298"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108300"><span class="hs-identifier hs-var">consume</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108297"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679108296"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>
</span><span id="line-95"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-96"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679108296"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-97"></span><span>        </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108376"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108299"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S1"><span class="hs-identifier hs-var">S1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108294"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108295"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-98"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S1"><span class="hs-identifier hs-type">S1</span></a></span><span> </span><span id="local-6989586621679108293"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108293"><span class="hs-identifier hs-var">a</span></a></span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108376"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108299"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S2"><span class="hs-identifier hs-var">S2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108293"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108294"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108295"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-99"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S2"><span class="hs-identifier hs-type">S2</span></a></span><span> </span><span id="local-6989586621679108292"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108292"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679108291"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108291"><span class="hs-identifier hs-var">b</span></a></span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108376"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108299"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S3"><span class="hs-identifier hs-var">S3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108292"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108291"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108294"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108295"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-100"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S3"><span class="hs-identifier hs-type">S3</span></a></span><span> </span><span id="local-6989586621679108290"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108290"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679108289"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108289"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679108288"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108288"><span class="hs-identifier hs-var">c</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108376"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108299"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S4"><span class="hs-identifier hs-var">S4</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108290"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108289"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108288"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108294"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108295"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-101"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S4"><span class="hs-identifier hs-type">S4</span></a></span><span> </span><span id="local-6989586621679108287"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108287"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679108286"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108286"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679108285"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108285"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679108284"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108284"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; T -&gt; Step T Char
forall s.
String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; s -&gt; Step s Char
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#decodeError"><span class="hs-identifier hs-var">decodeError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;streamUtf8&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;UTF-8&quot;</span></span><span> </span><span class="annot"><span class="annottext">OnDecodeError
</span><a href="#local-6989586621679108379"><span class="hs-identifier hs-var">onErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Maybe Word8
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108287"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-102"></span><span>                           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108299"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S3"><span class="hs-identifier hs-var">S3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108286"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108285"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108284"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108295"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-103"></span><span>        </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679108294"><span class="annot"><span class="annottext">x :: Word8
</span><a href="#local-6989586621679108294"><span class="hs-identifier hs-var hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int -&gt; Word8
</span><a href="../../bytestring/src/Data.ByteString.Unsafe.html#unsafeIndex"><span class="hs-identifier hs-var">B.unsafeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108298"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108295"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-104"></span><span>    </span><span class="annot"><a href="#local-6989586621679108300"><span class="hs-identifier hs-var">consume</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-type">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step T Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-105"></span><span>    </span><span class="annot"><a href="#local-6989586621679108300"><span class="hs-identifier hs-var">consume</span></a></span><span> </span><span id="local-6989586621679108280"><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108280"><span class="hs-identifier hs-var">st</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; T -&gt; Step T Char
forall s.
String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; s -&gt; Step s Char
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#decodeError"><span class="hs-identifier hs-var">decodeError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;streamUtf8&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;UTF-8&quot;</span></span><span> </span><span class="annot"><span class="annottext">OnDecodeError
</span><a href="#local-6989586621679108379"><span class="hs-identifier hs-var">onErr</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Word8
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108280"><span class="hs-identifier hs-var">st</span></a></span><span>
</span><span id="line-106"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#streamUtf8"><span class="hs-pragma hs-type">streamUtf8</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span class="hs-comment">-- | /O(n)/ Convert a 'ByteString' into a 'Stream Char', using little</span><span>
</span><span id="line-109"></span><span class="hs-comment">-- endian UTF-16 encoding.</span><span>
</span><span id="line-110"></span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#streamUtf16LE"><span class="hs-identifier hs-type">streamUtf16LE</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Encoding.Error.html#OnDecodeError"><span class="hs-identifier hs-type">OnDecodeError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-111"></span><span id="streamUtf16LE"><span class="annot"><span class="annottext">streamUtf16LE :: OnDecodeError -&gt; ByteString -&gt; Stream Char
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#streamUtf16LE"><span class="hs-identifier hs-var hs-var">streamUtf16LE</span></a></span></span><span> </span><span id="local-6989586621679108279"><span class="annot"><span class="annottext">OnDecodeError
</span><a href="#local-6989586621679108279"><span class="hs-identifier hs-var">onErr</span></a></span></span><span> </span><span id="local-6989586621679108278"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108278"><span class="hs-identifier hs-var">bs0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(T -&gt; Step T Char) -&gt; T -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108277"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108278"><span class="hs-identifier hs-var">bs0</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#unknownSize"><span class="hs-identifier hs-var">unknownSize</span></a></span><span>
</span><span id="line-112"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-113"></span><span>    </span><span id="local-6989586621679108277"><span class="annot"><span class="annottext">next :: T -&gt; Step T Char
</span><a href="#local-6989586621679108277"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-type">T</span></a></span><span> </span><span id="local-6989586621679108252"><span class="annot"><span class="annottext">bs :: ByteString
</span><a href="#local-6989586621679108252"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679108251"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108251"><span class="hs-identifier hs-var">ps</span></a></span></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span id="local-6989586621679108250"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108250"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-114"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108250"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108249"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf16.html#validate1"><span class="hs-identifier hs-var">U16.validate1</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679108247"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-115"></span><span>          </span><span class="annot"><span class="annottext">Char -&gt; T -&gt; Step T Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word16 -&gt; Char
</span><a href="Data.Text.Internal.Unsafe.Char.html#unsafeChr"><span class="hs-identifier hs-var">unsafeChr</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679108247"><span class="hs-identifier hs-var">x1</span></a></span><span class="hs-special">)</span><span>         </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108252"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108250"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-116"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108250"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108249"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Word16 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf16.html#validate2"><span class="hs-identifier hs-var">U16.validate2</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679108247"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679108245"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-117"></span><span>          </span><span class="annot"><span class="annottext">Char -&gt; T -&gt; Step T Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word16 -&gt; Word16 -&gt; Char
</span><a href="Data.Text.Internal.Encoding.Utf16.html#chr2"><span class="hs-identifier hs-var">U16.chr2</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679108247"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679108245"><span class="hs-identifier hs-var">x2</span></a></span><span class="hs-special">)</span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108252"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108250"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-118"></span><span>      </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679108249"><span class="annot"><span class="annottext">len :: Int
</span><a href="#local-6989586621679108249"><span class="hs-identifier hs-var hs-var">len</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="../../bytestring/src/Data.ByteString.html#length"><span class="hs-identifier hs-var">B.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108251"><span class="hs-identifier hs-var">ps</span></a></span><span>
</span><span id="line-119"></span><span>            </span><span id="local-6989586621679108247"><span class="annot"><span class="annottext">x1 :: Word16
</span><a href="#local-6989586621679108247"><span class="hs-identifier hs-var hs-var">x1</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Word16 -&gt; Word16
forall {a}. (Num a, UnsafeShift a) =&gt; a -&gt; a -&gt; a
</span><a href="#local-6989586621679108239"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Word16
</span><a href="#local-6989586621679108238"><span class="hs-identifier hs-var">idx</span></a></span><span>  </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108250"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Word16
</span><a href="#local-6989586621679108238"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108250"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-120"></span><span>            </span><span id="local-6989586621679108245"><span class="annot"><span class="annottext">x2 :: Word16
</span><a href="#local-6989586621679108245"><span class="hs-identifier hs-var hs-var">x2</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Word16 -&gt; Word16
forall {a}. (Num a, UnsafeShift a) =&gt; a -&gt; a -&gt; a
</span><a href="#local-6989586621679108239"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Word16
</span><a href="#local-6989586621679108238"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108250"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Word16
</span><a href="#local-6989586621679108238"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108250"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-121"></span><span>            </span><span id="local-6989586621679108239"><span class="annot"><span class="annottext">c :: a -&gt; a -&gt; a
</span><a href="#local-6989586621679108239"><span class="hs-identifier hs-var hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679108227"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679108227"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679108226"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679108226"><span class="hs-identifier hs-var">w2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679108227"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679108226"><span class="hs-identifier hs-var">w2</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Int -&gt; a
forall a. UnsafeShift a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Text.Internal.Unsafe.Shift.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">)</span><span>
</span><span id="line-122"></span><span>            </span><span id="local-6989586621679108238"><span class="annot"><span class="annottext">idx :: Int -&gt; Word16
</span><a href="#local-6989586621679108238"><span class="hs-identifier hs-var hs-var">idx</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word16
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#word8ToWord16"><span class="hs-identifier hs-var">word8ToWord16</span></a></span><span> </span><span class="annot"><span class="annottext">(Word8 -&gt; Word16) -&gt; (Int -&gt; Word8) -&gt; Int -&gt; Word16
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int -&gt; Word8
</span><a href="../../bytestring/src/Data.ByteString.Unsafe.html#unsafeIndex"><span class="hs-identifier hs-var">B.unsafeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108251"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word16"><span class="hs-identifier hs-type">Word16</span></a></span><span>
</span><span id="line-123"></span><span>    </span><span class="annot"><a href="#local-6989586621679108277"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span id="local-6989586621679108223"><span class="annot"><span class="annottext">st :: T
</span><a href="#local-6989586621679108223"><span class="hs-identifier hs-var">st</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-type">T</span></a></span><span> </span><span id="local-6989586621679108222"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108222"><span class="hs-identifier hs-var">bs</span></a></span></span><span> </span><span id="local-6989586621679108221"><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679108221"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679108220"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108220"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-124"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679108221"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-125"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S2"><span class="hs-identifier hs-type">S2</span></a></span><span> </span><span id="local-6989586621679108219"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108219"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679108218"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108218"><span class="hs-identifier hs-var">w2</span></a></span></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf16.html#validate1"><span class="hs-identifier hs-var">U16.validate1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word16
</span><a href="#local-6989586621679108217"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108219"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108218"><span class="hs-identifier hs-var">w2</span></a></span><span class="hs-special">)</span><span>           </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-126"></span><span>          </span><span class="annot"><span class="annottext">Char -&gt; T -&gt; Step T Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word16 -&gt; Char
</span><a href="Data.Text.Internal.Unsafe.Char.html#unsafeChr"><span class="hs-identifier hs-var">unsafeChr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word16
</span><a href="#local-6989586621679108217"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108219"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108218"><span class="hs-identifier hs-var">w2</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>   </span><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108216"><span class="hs-identifier hs-var">es</span></a></span><span>
</span><span id="line-127"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S4"><span class="hs-identifier hs-type">S4</span></a></span><span> </span><span id="local-6989586621679108215"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108215"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679108214"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108214"><span class="hs-identifier hs-var">w2</span></a></span></span><span> </span><span id="local-6989586621679108213"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108213"><span class="hs-identifier hs-var">w3</span></a></span></span><span> </span><span id="local-6989586621679108212"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108212"><span class="hs-identifier hs-var">w4</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Word16 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf16.html#validate2"><span class="hs-identifier hs-var">U16.validate2</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word16
</span><a href="#local-6989586621679108217"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108215"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108214"><span class="hs-identifier hs-var">w2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word16
</span><a href="#local-6989586621679108217"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108213"><span class="hs-identifier hs-var">w3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108212"><span class="hs-identifier hs-var">w4</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-128"></span><span>          </span><span class="annot"><span class="annottext">Char -&gt; T -&gt; Step T Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word16 -&gt; Word16 -&gt; Char
</span><a href="Data.Text.Internal.Encoding.Utf16.html#chr2"><span class="hs-identifier hs-var">U16.chr2</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word16
</span><a href="#local-6989586621679108217"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108215"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108214"><span class="hs-identifier hs-var">w2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word16
</span><a href="#local-6989586621679108217"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108213"><span class="hs-identifier hs-var">w3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108212"><span class="hs-identifier hs-var">w4</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108216"><span class="hs-identifier hs-var">es</span></a></span><span>
</span><span id="line-129"></span><span>        </span><span class="annot"><span class="annottext">S
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108211"><span class="hs-identifier hs-var">consume</span></a></span><span> </span><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108223"><span class="hs-identifier hs-var">st</span></a></span><span>
</span><span id="line-130"></span><span>       </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679108216"><span class="annot"><span class="annottext">es :: T
</span><a href="#local-6989586621679108216"><span class="hs-identifier hs-var hs-var">es</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108222"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108220"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-131"></span><span>             </span><span class="annot"><a href="#local-6989586621679108217"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word16"><span class="hs-identifier hs-type">Word16</span></a></span><span>
</span><span id="line-132"></span><span>             </span><span id="local-6989586621679108217"><span class="annot"><span class="annottext">c :: Word8 -&gt; Word8 -&gt; Word16
</span><a href="#local-6989586621679108217"><span class="hs-identifier hs-var hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679108210"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108210"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679108209"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108209"><span class="hs-identifier hs-var">w2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word16
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#word8ToWord16"><span class="hs-identifier hs-var">word8ToWord16</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108210"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Word16 -&gt; Word16
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word16
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#word8ToWord16"><span class="hs-identifier hs-var">word8ToWord16</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108209"><span class="hs-identifier hs-var">w2</span></a></span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Int -&gt; Word16
forall a. UnsafeShift a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Text.Internal.Unsafe.Shift.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">)</span><span>
</span><span id="line-133"></span><span>    </span><span id="local-6989586621679108211"><span class="annot"><span class="annottext">consume :: T -&gt; Step T Char
</span><a href="#local-6989586621679108211"><span class="hs-identifier hs-var hs-var">consume</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-type">T</span></a></span><span> </span><span id="local-6989586621679108208"><span class="annot"><span class="annottext">bs :: ByteString
</span><a href="#local-6989586621679108208"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679108207"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108207"><span class="hs-identifier hs-var">ps</span></a></span></span><span> </span><span id="local-6989586621679108206"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108206"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679108205"><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679108205"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679108204"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108204"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-134"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108204"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="../../bytestring/src/Data.ByteString.html#length"><span class="hs-identifier hs-var">B.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108207"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108211"><span class="hs-identifier hs-var">consume</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108206"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679108205"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>
</span><span id="line-135"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-136"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679108205"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-137"></span><span>        </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108277"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108208"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S1"><span class="hs-identifier hs-var">S1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108203"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108204"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-138"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S1"><span class="hs-identifier hs-type">S1</span></a></span><span> </span><span id="local-6989586621679108202"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108202"><span class="hs-identifier hs-var">w1</span></a></span></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108277"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108208"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S2"><span class="hs-identifier hs-var">S2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108202"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108203"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108204"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-139"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S2"><span class="hs-identifier hs-type">S2</span></a></span><span> </span><span id="local-6989586621679108201"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108201"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679108200"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108200"><span class="hs-identifier hs-var">w2</span></a></span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108277"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108208"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S3"><span class="hs-identifier hs-var">S3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108201"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108200"><span class="hs-identifier hs-var">w2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108203"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108204"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-140"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S3"><span class="hs-identifier hs-type">S3</span></a></span><span> </span><span id="local-6989586621679108199"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108199"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679108198"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108198"><span class="hs-identifier hs-var">w2</span></a></span></span><span> </span><span id="local-6989586621679108197"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108197"><span class="hs-identifier hs-var">w3</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108277"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108208"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S4"><span class="hs-identifier hs-var">S4</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108199"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108198"><span class="hs-identifier hs-var">w2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108197"><span class="hs-identifier hs-var">w3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108203"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108204"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-141"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S4"><span class="hs-identifier hs-type">S4</span></a></span><span> </span><span id="local-6989586621679108196"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108196"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679108195"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108195"><span class="hs-identifier hs-var">w2</span></a></span></span><span> </span><span id="local-6989586621679108194"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108194"><span class="hs-identifier hs-var">w3</span></a></span></span><span> </span><span id="local-6989586621679108193"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108193"><span class="hs-identifier hs-var">w4</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; T -&gt; Step T Char
forall s.
String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; s -&gt; Step s Char
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#decodeError"><span class="hs-identifier hs-var">decodeError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;streamUtf16LE&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;UTF-16LE&quot;</span></span><span> </span><span class="annot"><span class="annottext">OnDecodeError
</span><a href="#local-6989586621679108279"><span class="hs-identifier hs-var">onErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Maybe Word8
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108196"><span class="hs-identifier hs-var">w1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-142"></span><span>                           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108208"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S3"><span class="hs-identifier hs-var">S3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108195"><span class="hs-identifier hs-var">w2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108194"><span class="hs-identifier hs-var">w3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108193"><span class="hs-identifier hs-var">w4</span></a></span><span class="hs-special">)</span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108204"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-143"></span><span>        </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679108203"><span class="annot"><span class="annottext">x :: Word8
</span><a href="#local-6989586621679108203"><span class="hs-identifier hs-var hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int -&gt; Word8
</span><a href="../../bytestring/src/Data.ByteString.Unsafe.html#unsafeIndex"><span class="hs-identifier hs-var">B.unsafeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108207"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108204"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-144"></span><span>    </span><span class="annot"><a href="#local-6989586621679108211"><span class="hs-identifier hs-var">consume</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-type">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step T Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-145"></span><span>    </span><span class="annot"><a href="#local-6989586621679108211"><span class="hs-identifier hs-var">consume</span></a></span><span> </span><span id="local-6989586621679108192"><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108192"><span class="hs-identifier hs-var">st</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; T -&gt; Step T Char
forall s.
String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; s -&gt; Step s Char
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#decodeError"><span class="hs-identifier hs-var">decodeError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;streamUtf16LE&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;UTF-16LE&quot;</span></span><span> </span><span class="annot"><span class="annottext">OnDecodeError
</span><a href="#local-6989586621679108279"><span class="hs-identifier hs-var">onErr</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Word8
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108192"><span class="hs-identifier hs-var">st</span></a></span><span>
</span><span id="line-146"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#streamUtf16LE"><span class="hs-pragma hs-type">streamUtf16LE</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-147"></span><span>
</span><span id="line-148"></span><span class="hs-comment">-- | /O(n)/ Convert a 'ByteString' into a 'Stream Char', using big</span><span>
</span><span id="line-149"></span><span class="hs-comment">-- endian UTF-16 encoding.</span><span>
</span><span id="line-150"></span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#streamUtf16BE"><span class="hs-identifier hs-type">streamUtf16BE</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Encoding.Error.html#OnDecodeError"><span class="hs-identifier hs-type">OnDecodeError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-151"></span><span id="streamUtf16BE"><span class="annot"><span class="annottext">streamUtf16BE :: OnDecodeError -&gt; ByteString -&gt; Stream Char
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#streamUtf16BE"><span class="hs-identifier hs-var hs-var">streamUtf16BE</span></a></span></span><span> </span><span id="local-6989586621679108191"><span class="annot"><span class="annottext">OnDecodeError
</span><a href="#local-6989586621679108191"><span class="hs-identifier hs-var">onErr</span></a></span></span><span> </span><span id="local-6989586621679108190"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108190"><span class="hs-identifier hs-var">bs0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(T -&gt; Step T Char) -&gt; T -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108189"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108190"><span class="hs-identifier hs-var">bs0</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#unknownSize"><span class="hs-identifier hs-var">unknownSize</span></a></span><span>
</span><span id="line-152"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-153"></span><span>    </span><span id="local-6989586621679108189"><span class="annot"><span class="annottext">next :: T -&gt; Step T Char
</span><a href="#local-6989586621679108189"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-type">T</span></a></span><span> </span><span id="local-6989586621679108165"><span class="annot"><span class="annottext">bs :: ByteString
</span><a href="#local-6989586621679108165"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679108164"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108164"><span class="hs-identifier hs-var">ps</span></a></span></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span id="local-6989586621679108163"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108163"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-154"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108163"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108162"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf16.html#validate1"><span class="hs-identifier hs-var">U16.validate1</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679108161"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-155"></span><span>          </span><span class="annot"><span class="annottext">Char -&gt; T -&gt; Step T Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word16 -&gt; Char
</span><a href="Data.Text.Internal.Unsafe.Char.html#unsafeChr"><span class="hs-identifier hs-var">unsafeChr</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679108161"><span class="hs-identifier hs-var">x1</span></a></span><span class="hs-special">)</span><span>         </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108165"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108163"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-156"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108163"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108162"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Word16 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf16.html#validate2"><span class="hs-identifier hs-var">U16.validate2</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679108161"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679108160"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-157"></span><span>          </span><span class="annot"><span class="annottext">Char -&gt; T -&gt; Step T Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word16 -&gt; Word16 -&gt; Char
</span><a href="Data.Text.Internal.Encoding.Utf16.html#chr2"><span class="hs-identifier hs-var">U16.chr2</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679108161"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Word16
</span><a href="#local-6989586621679108160"><span class="hs-identifier hs-var">x2</span></a></span><span class="hs-special">)</span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108165"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108163"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-158"></span><span>      </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679108162"><span class="annot"><span class="annottext">len :: Int
</span><a href="#local-6989586621679108162"><span class="hs-identifier hs-var hs-var">len</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="../../bytestring/src/Data.ByteString.html#length"><span class="hs-identifier hs-var">B.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108164"><span class="hs-identifier hs-var">ps</span></a></span><span>
</span><span id="line-159"></span><span>            </span><span id="local-6989586621679108161"><span class="annot"><span class="annottext">x1 :: Word16
</span><a href="#local-6989586621679108161"><span class="hs-identifier hs-var hs-var">x1</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Word16 -&gt; Word16
forall {a}. (Num a, UnsafeShift a) =&gt; a -&gt; a -&gt; a
</span><a href="#local-6989586621679108155"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Word16
</span><a href="#local-6989586621679108154"><span class="hs-identifier hs-var">idx</span></a></span><span>  </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108163"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Word16
</span><a href="#local-6989586621679108154"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108163"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-160"></span><span>            </span><span id="local-6989586621679108160"><span class="annot"><span class="annottext">x2 :: Word16
</span><a href="#local-6989586621679108160"><span class="hs-identifier hs-var hs-var">x2</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Word16 -&gt; Word16
forall {a}. (Num a, UnsafeShift a) =&gt; a -&gt; a -&gt; a
</span><a href="#local-6989586621679108155"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Word16
</span><a href="#local-6989586621679108154"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108163"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Word16
</span><a href="#local-6989586621679108154"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108163"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-161"></span><span>            </span><span id="local-6989586621679108155"><span class="annot"><span class="annottext">c :: a -&gt; a -&gt; a
</span><a href="#local-6989586621679108155"><span class="hs-identifier hs-var hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679108143"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679108143"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679108142"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679108142"><span class="hs-identifier hs-var">w2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679108143"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Int -&gt; a
forall a. UnsafeShift a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Text.Internal.Unsafe.Shift.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679108142"><span class="hs-identifier hs-var">w2</span></a></span><span>
</span><span id="line-162"></span><span>            </span><span id="local-6989586621679108154"><span class="annot"><span class="annottext">idx :: Int -&gt; Word16
</span><a href="#local-6989586621679108154"><span class="hs-identifier hs-var hs-var">idx</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word16
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#word8ToWord16"><span class="hs-identifier hs-var">word8ToWord16</span></a></span><span> </span><span class="annot"><span class="annottext">(Word8 -&gt; Word16) -&gt; (Int -&gt; Word8) -&gt; Int -&gt; Word16
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int -&gt; Word8
</span><a href="../../bytestring/src/Data.ByteString.Unsafe.html#unsafeIndex"><span class="hs-identifier hs-var">B.unsafeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108164"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word16"><span class="hs-identifier hs-type">Word16</span></a></span><span>
</span><span id="line-163"></span><span>    </span><span class="annot"><a href="#local-6989586621679108189"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span id="local-6989586621679108141"><span class="annot"><span class="annottext">st :: T
</span><a href="#local-6989586621679108141"><span class="hs-identifier hs-var">st</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-type">T</span></a></span><span> </span><span id="local-6989586621679108140"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108140"><span class="hs-identifier hs-var">bs</span></a></span></span><span> </span><span id="local-6989586621679108139"><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679108139"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679108138"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108138"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-164"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679108139"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-165"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S2"><span class="hs-identifier hs-type">S2</span></a></span><span> </span><span id="local-6989586621679108137"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108137"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679108136"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108136"><span class="hs-identifier hs-var">w2</span></a></span></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf16.html#validate1"><span class="hs-identifier hs-var">U16.validate1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word16
</span><a href="#local-6989586621679108135"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108137"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108136"><span class="hs-identifier hs-var">w2</span></a></span><span class="hs-special">)</span><span>           </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-166"></span><span>          </span><span class="annot"><span class="annottext">Char -&gt; T -&gt; Step T Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word16 -&gt; Char
</span><a href="Data.Text.Internal.Unsafe.Char.html#unsafeChr"><span class="hs-identifier hs-var">unsafeChr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word16
</span><a href="#local-6989586621679108135"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108137"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108136"><span class="hs-identifier hs-var">w2</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>   </span><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108134"><span class="hs-identifier hs-var">es</span></a></span><span>
</span><span id="line-167"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S4"><span class="hs-identifier hs-type">S4</span></a></span><span> </span><span id="local-6989586621679108133"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108133"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679108132"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108132"><span class="hs-identifier hs-var">w2</span></a></span></span><span> </span><span id="local-6989586621679108131"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108131"><span class="hs-identifier hs-var">w3</span></a></span></span><span> </span><span id="local-6989586621679108130"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108130"><span class="hs-identifier hs-var">w4</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Word16 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf16.html#validate2"><span class="hs-identifier hs-var">U16.validate2</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word16
</span><a href="#local-6989586621679108135"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108133"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108132"><span class="hs-identifier hs-var">w2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word16
</span><a href="#local-6989586621679108135"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108131"><span class="hs-identifier hs-var">w3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108130"><span class="hs-identifier hs-var">w4</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-168"></span><span>          </span><span class="annot"><span class="annottext">Char -&gt; T -&gt; Step T Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word16 -&gt; Word16 -&gt; Char
</span><a href="Data.Text.Internal.Encoding.Utf16.html#chr2"><span class="hs-identifier hs-var">U16.chr2</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word16
</span><a href="#local-6989586621679108135"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108133"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108132"><span class="hs-identifier hs-var">w2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word16
</span><a href="#local-6989586621679108135"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108131"><span class="hs-identifier hs-var">w3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108130"><span class="hs-identifier hs-var">w4</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108134"><span class="hs-identifier hs-var">es</span></a></span><span>
</span><span id="line-169"></span><span>        </span><span class="annot"><span class="annottext">S
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108129"><span class="hs-identifier hs-var">consume</span></a></span><span> </span><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108141"><span class="hs-identifier hs-var">st</span></a></span><span>
</span><span id="line-170"></span><span>       </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679108134"><span class="annot"><span class="annottext">es :: T
</span><a href="#local-6989586621679108134"><span class="hs-identifier hs-var hs-var">es</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108140"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108138"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-171"></span><span>             </span><span class="annot"><a href="#local-6989586621679108135"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word16"><span class="hs-identifier hs-type">Word16</span></a></span><span>
</span><span id="line-172"></span><span>             </span><span id="local-6989586621679108135"><span class="annot"><span class="annottext">c :: Word8 -&gt; Word8 -&gt; Word16
</span><a href="#local-6989586621679108135"><span class="hs-identifier hs-var hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679108128"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108128"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679108127"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108127"><span class="hs-identifier hs-var">w2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word16
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#word8ToWord16"><span class="hs-identifier hs-var">word8ToWord16</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108128"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Int -&gt; Word16
forall a. UnsafeShift a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Text.Internal.Unsafe.Shift.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Word16 -&gt; Word16
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word16
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#word8ToWord16"><span class="hs-identifier hs-var">word8ToWord16</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108127"><span class="hs-identifier hs-var">w2</span></a></span><span>
</span><span id="line-173"></span><span>    </span><span id="local-6989586621679108129"><span class="annot"><span class="annottext">consume :: T -&gt; Step T Char
</span><a href="#local-6989586621679108129"><span class="hs-identifier hs-var hs-var">consume</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-type">T</span></a></span><span> </span><span id="local-6989586621679108126"><span class="annot"><span class="annottext">bs :: ByteString
</span><a href="#local-6989586621679108126"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679108125"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108125"><span class="hs-identifier hs-var">ps</span></a></span></span><span> </span><span id="local-6989586621679108124"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108124"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679108123"><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679108123"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679108122"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108122"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-174"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108122"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="../../bytestring/src/Data.ByteString.html#length"><span class="hs-identifier hs-var">B.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108125"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108129"><span class="hs-identifier hs-var">consume</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108124"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679108123"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>
</span><span id="line-175"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-176"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679108123"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-177"></span><span>        </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108189"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108126"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S1"><span class="hs-identifier hs-var">S1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108121"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108122"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-178"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S1"><span class="hs-identifier hs-type">S1</span></a></span><span> </span><span id="local-6989586621679108120"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108120"><span class="hs-identifier hs-var">w1</span></a></span></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108189"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108126"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S2"><span class="hs-identifier hs-var">S2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108120"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108121"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108122"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-179"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S2"><span class="hs-identifier hs-type">S2</span></a></span><span> </span><span id="local-6989586621679108119"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108119"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679108118"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108118"><span class="hs-identifier hs-var">w2</span></a></span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108189"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108126"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S3"><span class="hs-identifier hs-var">S3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108119"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108118"><span class="hs-identifier hs-var">w2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108121"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108122"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-180"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S3"><span class="hs-identifier hs-type">S3</span></a></span><span> </span><span id="local-6989586621679108117"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108117"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679108116"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108116"><span class="hs-identifier hs-var">w2</span></a></span></span><span> </span><span id="local-6989586621679108115"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108115"><span class="hs-identifier hs-var">w3</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108189"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108126"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S4"><span class="hs-identifier hs-var">S4</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108117"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108116"><span class="hs-identifier hs-var">w2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108115"><span class="hs-identifier hs-var">w3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108121"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108122"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-181"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S4"><span class="hs-identifier hs-type">S4</span></a></span><span> </span><span id="local-6989586621679108114"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108114"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679108113"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108113"><span class="hs-identifier hs-var">w2</span></a></span></span><span> </span><span id="local-6989586621679108112"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108112"><span class="hs-identifier hs-var">w3</span></a></span></span><span> </span><span id="local-6989586621679108111"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108111"><span class="hs-identifier hs-var">w4</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; T -&gt; Step T Char
forall s.
String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; s -&gt; Step s Char
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#decodeError"><span class="hs-identifier hs-var">decodeError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;streamUtf16BE&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;UTF-16BE&quot;</span></span><span> </span><span class="annot"><span class="annottext">OnDecodeError
</span><a href="#local-6989586621679108191"><span class="hs-identifier hs-var">onErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Maybe Word8
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108114"><span class="hs-identifier hs-var">w1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-182"></span><span>                           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108126"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S3"><span class="hs-identifier hs-var">S3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108113"><span class="hs-identifier hs-var">w2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108112"><span class="hs-identifier hs-var">w3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108111"><span class="hs-identifier hs-var">w4</span></a></span><span class="hs-special">)</span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108122"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-183"></span><span>        </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679108121"><span class="annot"><span class="annottext">x :: Word8
</span><a href="#local-6989586621679108121"><span class="hs-identifier hs-var hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int -&gt; Word8
</span><a href="../../bytestring/src/Data.ByteString.Unsafe.html#unsafeIndex"><span class="hs-identifier hs-var">B.unsafeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108125"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108122"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-184"></span><span>    </span><span class="annot"><a href="#local-6989586621679108129"><span class="hs-identifier hs-var">consume</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-type">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step T Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-185"></span><span>    </span><span class="annot"><a href="#local-6989586621679108129"><span class="hs-identifier hs-var">consume</span></a></span><span> </span><span id="local-6989586621679108110"><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108110"><span class="hs-identifier hs-var">st</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; T -&gt; Step T Char
forall s.
String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; s -&gt; Step s Char
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#decodeError"><span class="hs-identifier hs-var">decodeError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;streamUtf16BE&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;UTF-16BE&quot;</span></span><span> </span><span class="annot"><span class="annottext">OnDecodeError
</span><a href="#local-6989586621679108191"><span class="hs-identifier hs-var">onErr</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Word8
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108110"><span class="hs-identifier hs-var">st</span></a></span><span>
</span><span id="line-186"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#streamUtf16BE"><span class="hs-pragma hs-type">streamUtf16BE</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-187"></span><span>
</span><span id="line-188"></span><span class="hs-comment">-- | /O(n)/ Convert a 'ByteString' into a 'Stream Char', using big</span><span>
</span><span id="line-189"></span><span class="hs-comment">-- endian UTF-32 encoding.</span><span>
</span><span id="line-190"></span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#streamUtf32BE"><span class="hs-identifier hs-type">streamUtf32BE</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Encoding.Error.html#OnDecodeError"><span class="hs-identifier hs-type">OnDecodeError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-191"></span><span id="streamUtf32BE"><span class="annot"><span class="annottext">streamUtf32BE :: OnDecodeError -&gt; ByteString -&gt; Stream Char
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#streamUtf32BE"><span class="hs-identifier hs-var hs-var">streamUtf32BE</span></a></span></span><span> </span><span id="local-6989586621679108109"><span class="annot"><span class="annottext">OnDecodeError
</span><a href="#local-6989586621679108109"><span class="hs-identifier hs-var">onErr</span></a></span></span><span> </span><span id="local-6989586621679108108"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108108"><span class="hs-identifier hs-var">bs0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(T -&gt; Step T Char) -&gt; T -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108107"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108108"><span class="hs-identifier hs-var">bs0</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#unknownSize"><span class="hs-identifier hs-var">unknownSize</span></a></span><span>
</span><span id="line-192"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-193"></span><span>    </span><span id="local-6989586621679108107"><span class="annot"><span class="annottext">next :: T -&gt; Step T Char
</span><a href="#local-6989586621679108107"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-type">T</span></a></span><span> </span><span id="local-6989586621679108090"><span class="annot"><span class="annottext">bs :: ByteString
</span><a href="#local-6989586621679108090"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679108089"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108089"><span class="hs-identifier hs-var">ps</span></a></span></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span id="local-6989586621679108088"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108088"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-194"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108088"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108087"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf32.html#validate"><span class="hs-identifier hs-var">U32.validate</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679108085"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-195"></span><span>          </span><span class="annot"><span class="annottext">Char -&gt; T -&gt; Step T Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word32 -&gt; Char
</span><a href="Data.Text.Internal.Unsafe.Char.html#unsafeChr32"><span class="hs-identifier hs-var">unsafeChr32</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679108085"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108090"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108088"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-196"></span><span>      </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679108087"><span class="annot"><span class="annottext">len :: Int
</span><a href="#local-6989586621679108087"><span class="hs-identifier hs-var hs-var">len</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="../../bytestring/src/Data.ByteString.html#length"><span class="hs-identifier hs-var">B.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108089"><span class="hs-identifier hs-var">ps</span></a></span><span>
</span><span id="line-197"></span><span>            </span><span id="local-6989586621679108085"><span class="annot"><span class="annottext">x :: Word32
</span><a href="#local-6989586621679108085"><span class="hs-identifier hs-var hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Int -&gt; Word32
forall a. UnsafeShift a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Text.Internal.Unsafe.Shift.html#shiftL"><span class="hs-identifier hs-var">shiftL</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679108077"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">24</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Int -&gt; Word32
forall a. UnsafeShift a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Text.Internal.Unsafe.Shift.html#shiftL"><span class="hs-identifier hs-var">shiftL</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679108076"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">16</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Int -&gt; Word32
forall a. UnsafeShift a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Text.Internal.Unsafe.Shift.html#shiftL"><span class="hs-identifier hs-var">shiftL</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679108075"><span class="hs-identifier hs-var">x3</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679108074"><span class="hs-identifier hs-var">x4</span></a></span><span>
</span><span id="line-198"></span><span>            </span><span id="local-6989586621679108077"><span class="annot"><span class="annottext">x1 :: Word32
</span><a href="#local-6989586621679108077"><span class="hs-identifier hs-var hs-var">x1</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32
</span><a href="#local-6989586621679108073"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108088"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-199"></span><span>            </span><span id="local-6989586621679108076"><span class="annot"><span class="annottext">x2 :: Word32
</span><a href="#local-6989586621679108076"><span class="hs-identifier hs-var hs-var">x2</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32
</span><a href="#local-6989586621679108073"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108088"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-200"></span><span>            </span><span id="local-6989586621679108075"><span class="annot"><span class="annottext">x3 :: Word32
</span><a href="#local-6989586621679108075"><span class="hs-identifier hs-var hs-var">x3</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32
</span><a href="#local-6989586621679108073"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108088"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span>
</span><span id="line-201"></span><span>            </span><span id="local-6989586621679108074"><span class="annot"><span class="annottext">x4 :: Word32
</span><a href="#local-6989586621679108074"><span class="hs-identifier hs-var hs-var">x4</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32
</span><a href="#local-6989586621679108073"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108088"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-special">)</span><span>
</span><span id="line-202"></span><span>            </span><span id="local-6989586621679108073"><span class="annot"><span class="annottext">idx :: Int -&gt; Word32
</span><a href="#local-6989586621679108073"><span class="hs-identifier hs-var hs-var">idx</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word32
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#word8ToWord32"><span class="hs-identifier hs-var">word8ToWord32</span></a></span><span> </span><span class="annot"><span class="annottext">(Word8 -&gt; Word32) -&gt; (Int -&gt; Word8) -&gt; Int -&gt; Word32
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int -&gt; Word8
</span><a href="../../bytestring/src/Data.ByteString.Unsafe.html#unsafeIndex"><span class="hs-identifier hs-var">B.unsafeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108089"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span>
</span><span id="line-203"></span><span>    </span><span class="annot"><a href="#local-6989586621679108107"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span id="local-6989586621679108065"><span class="annot"><span class="annottext">st :: T
</span><a href="#local-6989586621679108065"><span class="hs-identifier hs-var">st</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-type">T</span></a></span><span> </span><span id="local-6989586621679108064"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108064"><span class="hs-identifier hs-var">bs</span></a></span></span><span> </span><span id="local-6989586621679108063"><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679108063"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679108062"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108062"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-204"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679108063"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-205"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S4"><span class="hs-identifier hs-type">S4</span></a></span><span> </span><span id="local-6989586621679108061"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108061"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679108060"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108060"><span class="hs-identifier hs-var">w2</span></a></span></span><span> </span><span id="local-6989586621679108059"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108059"><span class="hs-identifier hs-var">w3</span></a></span></span><span> </span><span id="local-6989586621679108058"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108058"><span class="hs-identifier hs-var">w4</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf32.html#validate"><span class="hs-identifier hs-var">U32.validate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; Word32
</span><a href="#local-6989586621679108057"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108061"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108060"><span class="hs-identifier hs-var">w2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108059"><span class="hs-identifier hs-var">w3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108058"><span class="hs-identifier hs-var">w4</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-206"></span><span>          </span><span class="annot"><span class="annottext">Char -&gt; T -&gt; Step T Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word32 -&gt; Char
</span><a href="Data.Text.Internal.Unsafe.Char.html#unsafeChr32"><span class="hs-identifier hs-var">unsafeChr32</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; Word32
</span><a href="#local-6989586621679108057"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108061"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108060"><span class="hs-identifier hs-var">w2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108059"><span class="hs-identifier hs-var">w3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108058"><span class="hs-identifier hs-var">w4</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108056"><span class="hs-identifier hs-var">es</span></a></span><span>
</span><span id="line-207"></span><span>        </span><span class="annot"><span class="annottext">S
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108055"><span class="hs-identifier hs-var">consume</span></a></span><span> </span><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108065"><span class="hs-identifier hs-var">st</span></a></span><span>
</span><span id="line-208"></span><span>       </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679108056"><span class="annot"><span class="annottext">es :: T
</span><a href="#local-6989586621679108056"><span class="hs-identifier hs-var hs-var">es</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108064"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108062"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-209"></span><span>             </span><span class="annot"><a href="#local-6989586621679108057"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span>
</span><span id="line-210"></span><span>             </span><span id="local-6989586621679108057"><span class="annot"><span class="annottext">c :: Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; Word32
</span><a href="#local-6989586621679108057"><span class="hs-identifier hs-var hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679108054"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108054"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679108053"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108053"><span class="hs-identifier hs-var">w2</span></a></span></span><span> </span><span id="local-6989586621679108052"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108052"><span class="hs-identifier hs-var">w3</span></a></span></span><span> </span><span id="local-6989586621679108051"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108051"><span class="hs-identifier hs-var">w4</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679108050"><span class="hs-identifier hs-var">shifted</span></a></span><span>
</span><span id="line-211"></span><span>              </span><span class="hs-keyword">where</span><span>
</span><span id="line-212"></span><span>               </span><span id="local-6989586621679108050"><span class="annot"><span class="annottext">shifted :: Word32
</span><a href="#local-6989586621679108050"><span class="hs-identifier hs-var hs-var">shifted</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Int -&gt; Word32
forall a. UnsafeShift a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Text.Internal.Unsafe.Shift.html#shiftL"><span class="hs-identifier hs-var">shiftL</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679108043"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">24</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Int -&gt; Word32
forall a. UnsafeShift a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Text.Internal.Unsafe.Shift.html#shiftL"><span class="hs-identifier hs-var">shiftL</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679108042"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">16</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Int -&gt; Word32
forall a. UnsafeShift a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Text.Internal.Unsafe.Shift.html#shiftL"><span class="hs-identifier hs-var">shiftL</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679108041"><span class="hs-identifier hs-var">x3</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679108040"><span class="hs-identifier hs-var">x4</span></a></span><span>
</span><span id="line-213"></span><span>               </span><span id="local-6989586621679108043"><span class="annot"><span class="annottext">x1 :: Word32
</span><a href="#local-6989586621679108043"><span class="hs-identifier hs-var hs-var">x1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word32
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#word8ToWord32"><span class="hs-identifier hs-var">word8ToWord32</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108054"><span class="hs-identifier hs-var">w1</span></a></span><span>
</span><span id="line-214"></span><span>               </span><span id="local-6989586621679108042"><span class="annot"><span class="annottext">x2 :: Word32
</span><a href="#local-6989586621679108042"><span class="hs-identifier hs-var hs-var">x2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word32
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#word8ToWord32"><span class="hs-identifier hs-var">word8ToWord32</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108053"><span class="hs-identifier hs-var">w2</span></a></span><span>
</span><span id="line-215"></span><span>               </span><span id="local-6989586621679108041"><span class="annot"><span class="annottext">x3 :: Word32
</span><a href="#local-6989586621679108041"><span class="hs-identifier hs-var hs-var">x3</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word32
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#word8ToWord32"><span class="hs-identifier hs-var">word8ToWord32</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108052"><span class="hs-identifier hs-var">w3</span></a></span><span>
</span><span id="line-216"></span><span>               </span><span id="local-6989586621679108040"><span class="annot"><span class="annottext">x4 :: Word32
</span><a href="#local-6989586621679108040"><span class="hs-identifier hs-var hs-var">x4</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word32
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#word8ToWord32"><span class="hs-identifier hs-var">word8ToWord32</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108051"><span class="hs-identifier hs-var">w4</span></a></span><span>
</span><span id="line-217"></span><span>    </span><span id="local-6989586621679108055"><span class="annot"><span class="annottext">consume :: T -&gt; Step T Char
</span><a href="#local-6989586621679108055"><span class="hs-identifier hs-var hs-var">consume</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-type">T</span></a></span><span> </span><span id="local-6989586621679108039"><span class="annot"><span class="annottext">bs :: ByteString
</span><a href="#local-6989586621679108039"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679108038"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108038"><span class="hs-identifier hs-var">ps</span></a></span></span><span> </span><span id="local-6989586621679108037"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108037"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679108036"><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679108036"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679108035"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108035"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-218"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108035"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="../../bytestring/src/Data.ByteString.html#length"><span class="hs-identifier hs-var">B.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108038"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108055"><span class="hs-identifier hs-var">consume</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108037"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679108036"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>
</span><span id="line-219"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-220"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679108036"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-221"></span><span>        </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108107"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108039"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S1"><span class="hs-identifier hs-var">S1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108034"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108035"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-222"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S1"><span class="hs-identifier hs-type">S1</span></a></span><span> </span><span id="local-6989586621679108033"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108033"><span class="hs-identifier hs-var">w1</span></a></span></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108107"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108039"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S2"><span class="hs-identifier hs-var">S2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108033"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108034"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108035"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-223"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S2"><span class="hs-identifier hs-type">S2</span></a></span><span> </span><span id="local-6989586621679108032"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108032"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679108031"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108031"><span class="hs-identifier hs-var">w2</span></a></span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108107"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108039"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S3"><span class="hs-identifier hs-var">S3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108032"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108031"><span class="hs-identifier hs-var">w2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108034"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108035"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-224"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S3"><span class="hs-identifier hs-type">S3</span></a></span><span> </span><span id="local-6989586621679108030"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108030"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679108029"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108029"><span class="hs-identifier hs-var">w2</span></a></span></span><span> </span><span id="local-6989586621679108028"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108028"><span class="hs-identifier hs-var">w3</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108107"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108039"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S4"><span class="hs-identifier hs-var">S4</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108030"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108029"><span class="hs-identifier hs-var">w2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108028"><span class="hs-identifier hs-var">w3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108034"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108035"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-225"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S4"><span class="hs-identifier hs-type">S4</span></a></span><span> </span><span id="local-6989586621679108027"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108027"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679108026"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108026"><span class="hs-identifier hs-var">w2</span></a></span></span><span> </span><span id="local-6989586621679108025"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108025"><span class="hs-identifier hs-var">w3</span></a></span></span><span> </span><span id="local-6989586621679108024"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108024"><span class="hs-identifier hs-var">w4</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; T -&gt; Step T Char
forall s.
String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; s -&gt; Step s Char
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#decodeError"><span class="hs-identifier hs-var">decodeError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;streamUtf32BE&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;UTF-32BE&quot;</span></span><span> </span><span class="annot"><span class="annottext">OnDecodeError
</span><a href="#local-6989586621679108109"><span class="hs-identifier hs-var">onErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Maybe Word8
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108027"><span class="hs-identifier hs-var">w1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-226"></span><span>                           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108039"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S3"><span class="hs-identifier hs-var">S3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108026"><span class="hs-identifier hs-var">w2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108025"><span class="hs-identifier hs-var">w3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679108024"><span class="hs-identifier hs-var">w4</span></a></span><span class="hs-special">)</span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108035"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-227"></span><span>        </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679108034"><span class="annot"><span class="annottext">x :: Word8
</span><a href="#local-6989586621679108034"><span class="hs-identifier hs-var hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int -&gt; Word8
</span><a href="../../bytestring/src/Data.ByteString.Unsafe.html#unsafeIndex"><span class="hs-identifier hs-var">B.unsafeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108038"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108035"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-228"></span><span>    </span><span class="annot"><a href="#local-6989586621679108055"><span class="hs-identifier hs-var">consume</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-type">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step T Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-229"></span><span>    </span><span class="annot"><a href="#local-6989586621679108055"><span class="hs-identifier hs-var">consume</span></a></span><span> </span><span id="local-6989586621679108023"><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108023"><span class="hs-identifier hs-var">st</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; T -&gt; Step T Char
forall s.
String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; s -&gt; Step s Char
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#decodeError"><span class="hs-identifier hs-var">decodeError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;streamUtf32BE&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;UTF-32BE&quot;</span></span><span> </span><span class="annot"><span class="annottext">OnDecodeError
</span><a href="#local-6989586621679108109"><span class="hs-identifier hs-var">onErr</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Word8
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679108023"><span class="hs-identifier hs-var">st</span></a></span><span>
</span><span id="line-230"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#streamUtf32BE"><span class="hs-pragma hs-type">streamUtf32BE</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-231"></span><span>
</span><span id="line-232"></span><span class="hs-comment">-- | /O(n)/ Convert a 'ByteString' into a 'Stream Char', using little</span><span>
</span><span id="line-233"></span><span class="hs-comment">-- endian UTF-32 encoding.</span><span>
</span><span id="line-234"></span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#streamUtf32LE"><span class="hs-identifier hs-type">streamUtf32LE</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Encoding.Error.html#OnDecodeError"><span class="hs-identifier hs-type">OnDecodeError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-235"></span><span id="streamUtf32LE"><span class="annot"><span class="annottext">streamUtf32LE :: OnDecodeError -&gt; ByteString -&gt; Stream Char
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#streamUtf32LE"><span class="hs-identifier hs-var hs-var">streamUtf32LE</span></a></span></span><span> </span><span id="local-6989586621679108022"><span class="annot"><span class="annottext">OnDecodeError
</span><a href="#local-6989586621679108022"><span class="hs-identifier hs-var">onErr</span></a></span></span><span> </span><span id="local-6989586621679108021"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108021"><span class="hs-identifier hs-var">bs0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(T -&gt; Step T Char) -&gt; T -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108020"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108021"><span class="hs-identifier hs-var">bs0</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#unknownSize"><span class="hs-identifier hs-var">unknownSize</span></a></span><span>
</span><span id="line-236"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-237"></span><span>    </span><span id="local-6989586621679108020"><span class="annot"><span class="annottext">next :: T -&gt; Step T Char
</span><a href="#local-6989586621679108020"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-type">T</span></a></span><span> </span><span id="local-6989586621679108003"><span class="annot"><span class="annottext">bs :: ByteString
</span><a href="#local-6989586621679108003"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679108002"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108002"><span class="hs-identifier hs-var">ps</span></a></span></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span id="local-6989586621679108001"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108001"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-238"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108001"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108000"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf32.html#validate"><span class="hs-identifier hs-var">U32.validate</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679107999"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-239"></span><span>          </span><span class="annot"><span class="annottext">Char -&gt; T -&gt; Step T Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word32 -&gt; Char
</span><a href="Data.Text.Internal.Unsafe.Char.html#unsafeChr32"><span class="hs-identifier hs-var">unsafeChr32</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679107999"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108003"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108001"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-240"></span><span>      </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679108000"><span class="annot"><span class="annottext">len :: Int
</span><a href="#local-6989586621679108000"><span class="hs-identifier hs-var hs-var">len</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="../../bytestring/src/Data.ByteString.html#length"><span class="hs-identifier hs-var">B.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108002"><span class="hs-identifier hs-var">ps</span></a></span><span>
</span><span id="line-241"></span><span>            </span><span id="local-6989586621679107999"><span class="annot"><span class="annottext">x :: Word32
</span><a href="#local-6989586621679107999"><span class="hs-identifier hs-var hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Int -&gt; Word32
forall a. UnsafeShift a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Text.Internal.Unsafe.Shift.html#shiftL"><span class="hs-identifier hs-var">shiftL</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679107992"><span class="hs-identifier hs-var">x4</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">24</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Int -&gt; Word32
forall a. UnsafeShift a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Text.Internal.Unsafe.Shift.html#shiftL"><span class="hs-identifier hs-var">shiftL</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679107991"><span class="hs-identifier hs-var">x3</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">16</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Int -&gt; Word32
forall a. UnsafeShift a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Text.Internal.Unsafe.Shift.html#shiftL"><span class="hs-identifier hs-var">shiftL</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679107990"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679107989"><span class="hs-identifier hs-var">x1</span></a></span><span>
</span><span id="line-242"></span><span>            </span><span id="local-6989586621679107989"><span class="annot"><span class="annottext">x1 :: Word32
</span><a href="#local-6989586621679107989"><span class="hs-identifier hs-var hs-var">x1</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32
</span><a href="#local-6989586621679107988"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108001"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-243"></span><span>            </span><span id="local-6989586621679107990"><span class="annot"><span class="annottext">x2 :: Word32
</span><a href="#local-6989586621679107990"><span class="hs-identifier hs-var hs-var">x2</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32
</span><a href="#local-6989586621679107988"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108001"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-244"></span><span>            </span><span id="local-6989586621679107991"><span class="annot"><span class="annottext">x3 :: Word32
</span><a href="#local-6989586621679107991"><span class="hs-identifier hs-var hs-var">x3</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32
</span><a href="#local-6989586621679107988"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108001"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span>
</span><span id="line-245"></span><span>            </span><span id="local-6989586621679107992"><span class="annot"><span class="annottext">x4 :: Word32
</span><a href="#local-6989586621679107992"><span class="hs-identifier hs-var hs-var">x4</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Word32
</span><a href="#local-6989586621679107988"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679108001"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-special">)</span><span>
</span><span id="line-246"></span><span>            </span><span id="local-6989586621679107988"><span class="annot"><span class="annottext">idx :: Int -&gt; Word32
</span><a href="#local-6989586621679107988"><span class="hs-identifier hs-var hs-var">idx</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word32
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#word8ToWord32"><span class="hs-identifier hs-var">word8ToWord32</span></a></span><span> </span><span class="annot"><span class="annottext">(Word8 -&gt; Word32) -&gt; (Int -&gt; Word8) -&gt; Int -&gt; Word32
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int -&gt; Word8
</span><a href="../../bytestring/src/Data.ByteString.Unsafe.html#unsafeIndex"><span class="hs-identifier hs-var">B.unsafeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679108002"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span>
</span><span id="line-247"></span><span>    </span><span class="annot"><a href="#local-6989586621679108020"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span id="local-6989586621679107981"><span class="annot"><span class="annottext">st :: T
</span><a href="#local-6989586621679107981"><span class="hs-identifier hs-var">st</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-type">T</span></a></span><span> </span><span id="local-6989586621679107980"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679107980"><span class="hs-identifier hs-var">bs</span></a></span></span><span> </span><span id="local-6989586621679107979"><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679107979"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679107978"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107978"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-248"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679107979"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-249"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S4"><span class="hs-identifier hs-type">S4</span></a></span><span> </span><span id="local-6989586621679107977"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107977"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679107976"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107976"><span class="hs-identifier hs-var">w2</span></a></span></span><span> </span><span id="local-6989586621679107975"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107975"><span class="hs-identifier hs-var">w3</span></a></span></span><span> </span><span id="local-6989586621679107974"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107974"><span class="hs-identifier hs-var">w4</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Bool
</span><a href="Data.Text.Internal.Encoding.Utf32.html#validate"><span class="hs-identifier hs-var">U32.validate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; Word32
</span><a href="#local-6989586621679107973"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107977"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107976"><span class="hs-identifier hs-var">w2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107975"><span class="hs-identifier hs-var">w3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107974"><span class="hs-identifier hs-var">w4</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-250"></span><span>          </span><span class="annot"><span class="annottext">Char -&gt; T -&gt; Step T Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word32 -&gt; Char
</span><a href="Data.Text.Internal.Unsafe.Char.html#unsafeChr32"><span class="hs-identifier hs-var">unsafeChr32</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; Word32
</span><a href="#local-6989586621679107973"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107977"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107976"><span class="hs-identifier hs-var">w2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107975"><span class="hs-identifier hs-var">w3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107974"><span class="hs-identifier hs-var">w4</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679107972"><span class="hs-identifier hs-var">es</span></a></span><span>
</span><span id="line-251"></span><span>        </span><span class="annot"><span class="annottext">S
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679107971"><span class="hs-identifier hs-var">consume</span></a></span><span> </span><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679107981"><span class="hs-identifier hs-var">st</span></a></span><span>
</span><span id="line-252"></span><span>       </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679107972"><span class="annot"><span class="annottext">es :: T
</span><a href="#local-6989586621679107972"><span class="hs-identifier hs-var hs-var">es</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679107980"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107978"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-253"></span><span>             </span><span class="annot"><a href="#local-6989586621679107973"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span>
</span><span id="line-254"></span><span>             </span><span id="local-6989586621679107973"><span class="annot"><span class="annottext">c :: Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; Word32
</span><a href="#local-6989586621679107973"><span class="hs-identifier hs-var hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679107970"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107970"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679107969"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107969"><span class="hs-identifier hs-var">w2</span></a></span></span><span> </span><span id="local-6989586621679107968"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107968"><span class="hs-identifier hs-var">w3</span></a></span></span><span> </span><span id="local-6989586621679107967"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107967"><span class="hs-identifier hs-var">w4</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679107966"><span class="hs-identifier hs-var">shifted</span></a></span><span>
</span><span id="line-255"></span><span>              </span><span class="hs-keyword">where</span><span>
</span><span id="line-256"></span><span>               </span><span id="local-6989586621679107966"><span class="annot"><span class="annottext">shifted :: Word32
</span><a href="#local-6989586621679107966"><span class="hs-identifier hs-var hs-var">shifted</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Int -&gt; Word32
forall a. UnsafeShift a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Text.Internal.Unsafe.Shift.html#shiftL"><span class="hs-identifier hs-var">shiftL</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679107959"><span class="hs-identifier hs-var">x4</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">24</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Int -&gt; Word32
forall a. UnsafeShift a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Text.Internal.Unsafe.Shift.html#shiftL"><span class="hs-identifier hs-var">shiftL</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679107958"><span class="hs-identifier hs-var">x3</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">16</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Int -&gt; Word32
forall a. UnsafeShift a =&gt; a -&gt; Int -&gt; a
</span><a href="Data.Text.Internal.Unsafe.Shift.html#shiftL"><span class="hs-identifier hs-var">shiftL</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679107957"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Word32 -&gt; Word32
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679107956"><span class="hs-identifier hs-var">x1</span></a></span><span>
</span><span id="line-257"></span><span>               </span><span id="local-6989586621679107956"><span class="annot"><span class="annottext">x1 :: Word32
</span><a href="#local-6989586621679107956"><span class="hs-identifier hs-var hs-var">x1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word32
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#word8ToWord32"><span class="hs-identifier hs-var">word8ToWord32</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107970"><span class="hs-identifier hs-var">w1</span></a></span><span>
</span><span id="line-258"></span><span>               </span><span id="local-6989586621679107957"><span class="annot"><span class="annottext">x2 :: Word32
</span><a href="#local-6989586621679107957"><span class="hs-identifier hs-var hs-var">x2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word32
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#word8ToWord32"><span class="hs-identifier hs-var">word8ToWord32</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107969"><span class="hs-identifier hs-var">w2</span></a></span><span>
</span><span id="line-259"></span><span>               </span><span id="local-6989586621679107958"><span class="annot"><span class="annottext">x3 :: Word32
</span><a href="#local-6989586621679107958"><span class="hs-identifier hs-var hs-var">x3</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word32
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#word8ToWord32"><span class="hs-identifier hs-var">word8ToWord32</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107968"><span class="hs-identifier hs-var">w3</span></a></span><span>
</span><span id="line-260"></span><span>               </span><span id="local-6989586621679107959"><span class="annot"><span class="annottext">x4 :: Word32
</span><a href="#local-6989586621679107959"><span class="hs-identifier hs-var hs-var">x4</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word32
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#word8ToWord32"><span class="hs-identifier hs-var">word8ToWord32</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107967"><span class="hs-identifier hs-var">w4</span></a></span><span>
</span><span id="line-261"></span><span>    </span><span id="local-6989586621679107971"><span class="annot"><span class="annottext">consume :: T -&gt; Step T Char
</span><a href="#local-6989586621679107971"><span class="hs-identifier hs-var hs-var">consume</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-type">T</span></a></span><span> </span><span id="local-6989586621679107955"><span class="annot"><span class="annottext">bs :: ByteString
</span><a href="#local-6989586621679107955"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-type">Chunk</span></a></span><span> </span><span id="local-6989586621679107954"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679107954"><span class="hs-identifier hs-var">ps</span></a></span></span><span> </span><span id="local-6989586621679107953"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679107953"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679107952"><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679107952"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679107951"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107951"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-262"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107951"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int
</span><a href="../../bytestring/src/Data.ByteString.html#length"><span class="hs-identifier hs-var">B.length</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679107954"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679107971"><span class="hs-identifier hs-var">consume</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679107953"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679107952"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>
</span><span id="line-263"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-264"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">S
</span><a href="#local-6989586621679107952"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-265"></span><span>        </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108020"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679107955"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S1"><span class="hs-identifier hs-var">S1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107950"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107951"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-266"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S1"><span class="hs-identifier hs-type">S1</span></a></span><span> </span><span id="local-6989586621679107949"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107949"><span class="hs-identifier hs-var">w1</span></a></span></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108020"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679107955"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S2"><span class="hs-identifier hs-var">S2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107949"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107950"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107951"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-267"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S2"><span class="hs-identifier hs-type">S2</span></a></span><span> </span><span id="local-6989586621679107948"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107948"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679107947"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107947"><span class="hs-identifier hs-var">w2</span></a></span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108020"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679107955"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S3"><span class="hs-identifier hs-var">S3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107948"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107947"><span class="hs-identifier hs-var">w2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107950"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107951"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-268"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S3"><span class="hs-identifier hs-type">S3</span></a></span><span> </span><span id="local-6989586621679107946"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107946"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679107945"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107945"><span class="hs-identifier hs-var">w2</span></a></span></span><span> </span><span id="local-6989586621679107944"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107944"><span class="hs-identifier hs-var">w3</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">T -&gt; Step T Char
</span><a href="#local-6989586621679108020"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679107955"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S4"><span class="hs-identifier hs-var">S4</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107946"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107945"><span class="hs-identifier hs-var">w2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107944"><span class="hs-identifier hs-var">w3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107950"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107951"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-269"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S4"><span class="hs-identifier hs-type">S4</span></a></span><span> </span><span id="local-6989586621679107943"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107943"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621679107942"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107942"><span class="hs-identifier hs-var">w2</span></a></span></span><span> </span><span id="local-6989586621679107941"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107941"><span class="hs-identifier hs-var">w3</span></a></span></span><span> </span><span id="local-6989586621679107940"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107940"><span class="hs-identifier hs-var">w4</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; T -&gt; Step T Char
forall s.
String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; s -&gt; Step s Char
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#decodeError"><span class="hs-identifier hs-var">decodeError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;streamUtf32LE&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;UTF-32LE&quot;</span></span><span> </span><span class="annot"><span class="annottext">OnDecodeError
</span><a href="#local-6989586621679108022"><span class="hs-identifier hs-var">onErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Maybe Word8
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107943"><span class="hs-identifier hs-var">w1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-270"></span><span>                           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; S -&gt; Int -&gt; T
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-var">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679107955"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8 -&gt; S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S3"><span class="hs-identifier hs-var">S3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107942"><span class="hs-identifier hs-var">w2</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107941"><span class="hs-identifier hs-var">w3</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107940"><span class="hs-identifier hs-var">w4</span></a></span><span class="hs-special">)</span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107951"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-271"></span><span>        </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679107950"><span class="annot"><span class="annottext">x :: Word8
</span><a href="#local-6989586621679107950"><span class="hs-identifier hs-var hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Int -&gt; Word8
</span><a href="../../bytestring/src/Data.ByteString.Unsafe.html#unsafeIndex"><span class="hs-identifier hs-var">B.unsafeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679107954"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107951"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-272"></span><span>    </span><span class="annot"><a href="#local-6989586621679107971"><span class="hs-identifier hs-var">consume</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#T"><span class="hs-identifier hs-type">T</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="annot"><span class="annottext">S
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#S0"><span class="hs-identifier hs-var">S0</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step T Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-273"></span><span>    </span><span class="annot"><a href="#local-6989586621679107971"><span class="hs-identifier hs-var">consume</span></a></span><span> </span><span id="local-6989586621679107939"><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679107939"><span class="hs-identifier hs-var">st</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; T -&gt; Step T Char
forall s.
String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; s -&gt; Step s Char
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#decodeError"><span class="hs-identifier hs-var">decodeError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;streamUtf32LE&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;UTF-32LE&quot;</span></span><span> </span><span class="annot"><span class="annottext">OnDecodeError
</span><a href="#local-6989586621679108022"><span class="hs-identifier hs-var">onErr</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Word8
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">T
</span><a href="#local-6989586621679107939"><span class="hs-identifier hs-var">st</span></a></span><span>
</span><span id="line-274"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#streamUtf32LE"><span class="hs-pragma hs-type">streamUtf32LE</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-275"></span><span>
</span><span id="line-276"></span><span class="hs-comment">-- | /O(n)/ Convert a 'Stream' 'Word8' to a lazy 'ByteString'.</span><span>
</span><span id="line-277"></span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#unstreamChunks"><span class="hs-identifier hs-type">unstreamChunks</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span>
</span><span id="line-278"></span><span id="unstreamChunks"><span class="annot"><span class="annottext">unstreamChunks :: Int -&gt; Stream Word8 -&gt; ByteString
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#unstreamChunks"><span class="hs-identifier hs-var hs-var">unstreamChunks</span></a></span></span><span> </span><span id="local-6989586621679107937"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107937"><span class="hs-identifier hs-var">chunkSize</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679107936"><span class="annot"><span class="annottext">s -&gt; Step s Word8
</span><a href="#local-6989586621679107936"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679107935"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679107935"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679107934"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679107934"><span class="hs-identifier hs-var">len0</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">s -&gt; Int -&gt; ByteString
</span><a href="#local-6989586621679107933"><span class="hs-identifier hs-var">chunk</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679107935"><span class="hs-identifier hs-var">s0</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Size -&gt; Int
</span><a href="Data.Text.Internal.Fusion.Size.html#upperBound"><span class="hs-identifier hs-var">upperBound</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679107934"><span class="hs-identifier hs-var">len0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-279"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679107933"><span class="annot"><span class="annottext">chunk :: s -&gt; Int -&gt; ByteString
</span><a href="#local-6989586621679107933"><span class="hs-identifier hs-var hs-var">chunk</span></a></span></span><span> </span><span id="local-6989586621679107926"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679107926"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span id="local-6989586621679107925"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107925"><span class="hs-identifier hs-var">len1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO ByteString -&gt; ByteString
forall a. IO a -&gt; a
</span><a href="../../base/src/GHC.IO.Unsafe.html#unsafeDupablePerformIO"><span class="hs-identifier hs-var">unsafeDupablePerformIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO ByteString -&gt; ByteString) -&gt; IO ByteString -&gt; ByteString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-280"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679107921"><span class="annot"><span class="annottext">len :: Int
</span><a href="#local-6989586621679107921"><span class="hs-identifier hs-var hs-var">len</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#max"><span class="hs-identifier hs-var">max</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#min"><span class="hs-identifier hs-var">min</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107925"><span class="hs-identifier hs-var">len1</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107937"><span class="hs-identifier hs-var">chunkSize</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-281"></span><span>          </span><span class="annot"><span class="annottext">Int -&gt; IO (ForeignPtr Word8)
forall a. Int -&gt; IO (ForeignPtr a)
</span><a href="../../bytestring/src/Data.ByteString.Internal.html#mallocByteString"><span class="hs-identifier hs-var">mallocByteString</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107921"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">IO (ForeignPtr Word8)
-&gt; (ForeignPtr Word8 -&gt; IO ByteString) -&gt; IO ByteString
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; s -&gt; ForeignPtr Word8 -&gt; IO ByteString
</span><a href="#local-6989586621679107918"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107921"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679107926"><span class="hs-identifier hs-var">s1</span></a></span><span>
</span><span id="line-282"></span><span>          </span><span class="hs-keyword">where</span><span>
</span><span id="line-283"></span><span>            </span><span id="local-6989586621679107918"><span class="annot"><span class="annottext">loop :: Int -&gt; Int -&gt; s -&gt; ForeignPtr Word8 -&gt; IO ByteString
</span><a href="#local-6989586621679107918"><span class="hs-identifier hs-var hs-var">loop</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679107899"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107899"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679107898"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107898"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679107897"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679107897"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679107896"><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621679107896"><span class="hs-identifier hs-var">fp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Word8
</span><a href="#local-6989586621679107936"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679107897"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-284"></span><span>                </span><span class="annot"><span class="annottext">Step s Word8
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107898"><span class="hs-identifier hs-var">off</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; IO ByteString
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-285"></span><span>                     </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; IO ByteString
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(ByteString -&gt; IO ByteString) -&gt; ByteString -&gt; IO ByteString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; ByteString
</span><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-var">Chunk</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ForeignPtr Word8 -&gt; Int -&gt; ByteString
</span><a href="#local-6989586621679107894"><span class="hs-identifier hs-var">trimUp</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621679107896"><span class="hs-identifier hs-var">fp</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107898"><span class="hs-identifier hs-var">off</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-286"></span><span>                </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679107892"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679107892"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; s -&gt; ForeignPtr Word8 -&gt; IO ByteString
</span><a href="#local-6989586621679107918"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107899"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107898"><span class="hs-identifier hs-var">off</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679107892"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621679107896"><span class="hs-identifier hs-var">fp</span></a></span><span>
</span><span id="line-287"></span><span>                </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679107891"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107891"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679107890"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679107890"><span class="hs-identifier hs-var">s'</span></a></span></span><span>
</span><span id="line-288"></span><span>                    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107898"><span class="hs-identifier hs-var">off</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107937"><span class="hs-identifier hs-var">chunkSize</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-289"></span><span>                      </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679107888"><span class="annot"><span class="annottext">newLen :: Int
</span><a href="#local-6989586621679107888"><span class="hs-identifier hs-var hs-var">newLen</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107899"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107898"><span class="hs-identifier hs-var">off</span></a></span><span>
</span><span id="line-290"></span><span>                      </span><span class="annot"><span class="annottext">ByteString -&gt; IO ByteString
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(ByteString -&gt; IO ByteString) -&gt; ByteString -&gt; IO ByteString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString -&gt; ByteString
</span><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#Chunk"><span class="hs-identifier hs-var">Chunk</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ForeignPtr Word8 -&gt; Int -&gt; ByteString
</span><a href="#local-6989586621679107894"><span class="hs-identifier hs-var">trimUp</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621679107896"><span class="hs-identifier hs-var">fp</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107898"><span class="hs-identifier hs-var">off</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Int -&gt; ByteString
</span><a href="#local-6989586621679107933"><span class="hs-identifier hs-var">chunk</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679107897"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107888"><span class="hs-identifier hs-var">newLen</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-291"></span><span>                    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107898"><span class="hs-identifier hs-var">off</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107899"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8 -&gt; Int -&gt; Int -&gt; s -&gt; Word8 -&gt; IO ByteString
</span><a href="#local-6989586621679107887"><span class="hs-identifier hs-var">realloc</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621679107896"><span class="hs-identifier hs-var">fp</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107899"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107898"><span class="hs-identifier hs-var">off</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679107890"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107891"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-292"></span><span>                    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-293"></span><span>                      </span><span class="annot"><span class="annottext">ForeignPtr Word8 -&gt; (Ptr Word8 -&gt; IO ()) -&gt; IO ()
forall a b. ForeignPtr a -&gt; (Ptr a -&gt; IO b) -&gt; IO b
</span><a href="Data.Text.Internal.Functions.html#unsafeWithForeignPtr"><span class="hs-identifier hs-var">unsafeWithForeignPtr</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621679107896"><span class="hs-identifier hs-var">fp</span></a></span><span> </span><span class="annot"><span class="annottext">((Ptr Word8 -&gt; IO ()) -&gt; IO ()) -&gt; (Ptr Word8 -&gt; IO ()) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679107886"><span class="annot"><span class="annottext">Ptr Word8
</span><a href="#local-6989586621679107886"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ptr Word8 -&gt; Int -&gt; Word8 -&gt; IO ()
forall a b. Storable a =&gt; Ptr b -&gt; Int -&gt; a -&gt; IO ()
</span><a href="../../base/src/Foreign.Storable.html#pokeByteOff"><span class="hs-identifier hs-var">pokeByteOff</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr Word8
</span><a href="#local-6989586621679107886"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107898"><span class="hs-identifier hs-var">off</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107891"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-294"></span><span>                      </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; s -&gt; ForeignPtr Word8 -&gt; IO ByteString
</span><a href="#local-6989586621679107918"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107899"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107898"><span class="hs-identifier hs-var">off</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679107890"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621679107896"><span class="hs-identifier hs-var">fp</span></a></span><span>
</span><span id="line-295"></span><span>            </span><span class="hs-pragma">{-# NOINLINE</span><span> </span><span class="annot"><a href="#local-6989586621679107887"><span class="hs-pragma hs-type">realloc</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-296"></span><span>            </span><span id="local-6989586621679107887"><span class="annot"><span class="annottext">realloc :: ForeignPtr Word8 -&gt; Int -&gt; Int -&gt; s -&gt; Word8 -&gt; IO ByteString
</span><a href="#local-6989586621679107887"><span class="hs-identifier hs-var hs-var">realloc</span></a></span></span><span> </span><span id="local-6989586621679107885"><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621679107885"><span class="hs-identifier hs-var">fp</span></a></span></span><span> </span><span id="local-6989586621679107884"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107884"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679107883"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107883"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span id="local-6989586621679107882"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679107882"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679107881"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107881"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-297"></span><span>              </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679107878"><span class="annot"><span class="annottext">n' :: Int
</span><a href="#local-6989586621679107878"><span class="hs-identifier hs-var hs-var">n'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#min"><span class="hs-identifier hs-var">min</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107884"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107884"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107937"><span class="hs-identifier hs-var">chunkSize</span></a></span><span>
</span><span id="line-298"></span><span>              </span><span id="local-6989586621679107877"><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621679107877"><span class="hs-identifier hs-var">fp'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8 -&gt; Int -&gt; Int -&gt; IO (ForeignPtr Word8)
</span><a href="#local-6989586621679107876"><span class="hs-identifier hs-var">copy0</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621679107885"><span class="hs-identifier hs-var">fp</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107884"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107878"><span class="hs-identifier hs-var">n'</span></a></span><span>
</span><span id="line-299"></span><span>              </span><span class="annot"><span class="annottext">ForeignPtr Word8 -&gt; (Ptr Word8 -&gt; IO ()) -&gt; IO ()
forall a b. ForeignPtr a -&gt; (Ptr a -&gt; IO b) -&gt; IO b
</span><a href="Data.Text.Internal.Functions.html#unsafeWithForeignPtr"><span class="hs-identifier hs-var">unsafeWithForeignPtr</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621679107877"><span class="hs-identifier hs-var">fp'</span></a></span><span> </span><span class="annot"><span class="annottext">((Ptr Word8 -&gt; IO ()) -&gt; IO ()) -&gt; (Ptr Word8 -&gt; IO ()) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679107875"><span class="annot"><span class="annottext">Ptr Word8
</span><a href="#local-6989586621679107875"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ptr Word8 -&gt; Int -&gt; Word8 -&gt; IO ()
forall a b. Storable a =&gt; Ptr b -&gt; Int -&gt; a -&gt; IO ()
</span><a href="../../base/src/Foreign.Storable.html#pokeByteOff"><span class="hs-identifier hs-var">pokeByteOff</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr Word8
</span><a href="#local-6989586621679107875"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107883"><span class="hs-identifier hs-var">off</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621679107881"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-300"></span><span>              </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; s -&gt; ForeignPtr Word8 -&gt; IO ByteString
</span><a href="#local-6989586621679107918"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107878"><span class="hs-identifier hs-var">n'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107883"><span class="hs-identifier hs-var">off</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679107882"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621679107877"><span class="hs-identifier hs-var">fp'</span></a></span><span>
</span><span id="line-301"></span><span>            </span><span id="local-6989586621679107894"><span class="annot"><span class="annottext">trimUp :: ForeignPtr Word8 -&gt; Int -&gt; ByteString
</span><a href="#local-6989586621679107894"><span class="hs-identifier hs-var hs-var">trimUp</span></a></span></span><span> </span><span id="local-6989586621679107874"><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621679107874"><span class="hs-identifier hs-var">fp</span></a></span></span><span> </span><span id="local-6989586621679107873"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107873"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8 -&gt; Int -&gt; ByteString
</span><a href="Data.Text.Internal.ByteStringCompat.html#mkBS"><span class="hs-identifier hs-var">mkBS</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621679107874"><span class="hs-identifier hs-var">fp</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107873"><span class="hs-identifier hs-var">off</span></a></span><span>
</span><span id="line-302"></span><span>            </span><span class="annot"><a href="#local-6989586621679107876"><span class="hs-identifier hs-type">copy0</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.ForeignPtr.html#ForeignPtr"><span class="hs-identifier hs-type">ForeignPtr</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.ForeignPtr.html#ForeignPtr"><span class="hs-identifier hs-type">ForeignPtr</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-303"></span><span>            </span><span id="local-6989586621679107876"><span class="annot"><span class="annottext">copy0 :: ForeignPtr Word8 -&gt; Int -&gt; Int -&gt; IO (ForeignPtr Word8)
</span><a href="#local-6989586621679107876"><span class="hs-identifier hs-var hs-var">copy0</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679107871"><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621679107871"><span class="hs-identifier hs-var">src</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679107870"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107870"><span class="hs-identifier hs-var">srcLen</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679107869"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107869"><span class="hs-identifier hs-var">destLen</span></a></span></span><span> </span><span class="hs-glyph">=</span><span class="hs-cpp">
#if defined(ASSERTS)
</span><span>              </span><span class="hs-identifier">assert</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">srcLen</span><span> </span><span class="hs-operator">&lt;=</span><span> </span><span class="hs-identifier">destLen</span><span class="hs-special">)</span><span> </span><span class="hs-operator">$</span><span class="hs-cpp">
#endif
</span><span>              </span><span class="hs-keyword">do</span><span>
</span><span id="line-308"></span><span>                </span><span id="local-6989586621679107868"><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621679107868"><span class="hs-identifier hs-var">dest</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Int -&gt; IO (ForeignPtr Word8)
forall a. Int -&gt; IO (ForeignPtr a)
</span><a href="../../bytestring/src/Data.ByteString.Internal.html#mallocByteString"><span class="hs-identifier hs-var">mallocByteString</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107869"><span class="hs-identifier hs-var">destLen</span></a></span><span>
</span><span id="line-309"></span><span>                </span><span class="annot"><span class="annottext">ForeignPtr Word8 -&gt; (Ptr Word8 -&gt; IO ()) -&gt; IO ()
forall a b. ForeignPtr a -&gt; (Ptr a -&gt; IO b) -&gt; IO b
</span><a href="Data.Text.Internal.Functions.html#unsafeWithForeignPtr"><span class="hs-identifier hs-var">unsafeWithForeignPtr</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621679107871"><span class="hs-identifier hs-var">src</span></a></span><span>  </span><span class="annot"><span class="annottext">((Ptr Word8 -&gt; IO ()) -&gt; IO ()) -&gt; (Ptr Word8 -&gt; IO ()) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679107867"><span class="annot"><span class="annottext">Ptr Word8
</span><a href="#local-6989586621679107867"><span class="hs-identifier hs-var">src'</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-310"></span><span>                    </span><span class="annot"><span class="annottext">ForeignPtr Word8 -&gt; (Ptr Word8 -&gt; IO ()) -&gt; IO ()
forall a b. ForeignPtr a -&gt; (Ptr a -&gt; IO b) -&gt; IO b
</span><a href="Data.Text.Internal.Functions.html#unsafeWithForeignPtr"><span class="hs-identifier hs-var">unsafeWithForeignPtr</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621679107868"><span class="hs-identifier hs-var">dest</span></a></span><span> </span><span class="annot"><span class="annottext">((Ptr Word8 -&gt; IO ()) -&gt; IO ()) -&gt; (Ptr Word8 -&gt; IO ()) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679107866"><span class="annot"><span class="annottext">Ptr Word8
</span><a href="#local-6989586621679107866"><span class="hs-identifier hs-var">dest'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-311"></span><span>                        </span><span class="annot"><span class="annottext">Ptr Word8 -&gt; Ptr Word8 -&gt; Int -&gt; IO ()
</span><a href="../../bytestring/src/Data.ByteString.Internal.html#memcpy"><span class="hs-identifier hs-var">memcpy</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr Word8
</span><a href="#local-6989586621679107866"><span class="hs-identifier hs-var">dest'</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr Word8
</span><a href="#local-6989586621679107867"><span class="hs-identifier hs-var">src'</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679107870"><span class="hs-identifier hs-var">srcLen</span></a></span><span>
</span><span id="line-312"></span><span>                </span><span class="annot"><span class="annottext">ForeignPtr Word8 -&gt; IO (ForeignPtr Word8)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignPtr Word8
</span><a href="#local-6989586621679107868"><span class="hs-identifier hs-var">dest</span></a></span><span>
</span><span id="line-313"></span><span>
</span><span id="line-314"></span><span class="hs-comment">-- | /O(n)/ Convert a 'Stream' 'Word8' to a lazy 'ByteString'.</span><span>
</span><span id="line-315"></span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#unstream"><span class="hs-identifier hs-type">unstream</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span>
</span><span id="line-316"></span><span id="unstream"><span class="annot"><span class="annottext">unstream :: Stream Word8 -&gt; ByteString
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#unstream"><span class="hs-identifier hs-var hs-var">unstream</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Stream Word8 -&gt; ByteString
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#unstreamChunks"><span class="hs-identifier hs-var">unstreamChunks</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#defaultChunkSize"><span class="hs-identifier hs-var">defaultChunkSize</span></a></span><span>
</span><span id="line-317"></span><span>
</span><span id="line-318"></span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#decodeError"><span class="hs-identifier hs-type">decodeError</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621679108438"><span class="annot"><a href="#local-6989586621679108438"><span class="hs-identifier hs-type">s</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Encoding.Error.html#OnDecodeError"><span class="hs-identifier hs-type">OnDecodeError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span>
</span><span id="line-319"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679108438"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Step"><span class="hs-identifier hs-type">Step</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679108438"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-320"></span><span id="decodeError"><span class="annot"><span class="annottext">decodeError :: forall s.
String
-&gt; String -&gt; OnDecodeError -&gt; Maybe Word8 -&gt; s -&gt; Step s Char
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#decodeError"><span class="hs-identifier hs-var hs-var">decodeError</span></a></span></span><span> </span><span id="local-6989586621679107865"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679107865"><span class="hs-identifier hs-var">func</span></a></span></span><span> </span><span id="local-6989586621679107864"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679107864"><span class="hs-identifier hs-var">kind</span></a></span></span><span> </span><span id="local-6989586621679107863"><span class="annot"><span class="annottext">OnDecodeError
</span><a href="#local-6989586621679107863"><span class="hs-identifier hs-var">onErr</span></a></span></span><span> </span><span id="local-6989586621679107862"><span class="annot"><span class="annottext">Maybe Word8
</span><a href="#local-6989586621679107862"><span class="hs-identifier hs-var">mb</span></a></span></span><span> </span><span id="local-6989586621679107861"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679107861"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-321"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">OnDecodeError
</span><a href="#local-6989586621679107863"><span class="hs-identifier hs-var">onErr</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679107860"><span class="hs-identifier hs-var">desc</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Word8
</span><a href="#local-6989586621679107862"><span class="hs-identifier hs-var">mb</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-322"></span><span>      </span><span class="annot"><span class="annottext">Maybe Char
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679107861"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-323"></span><span>      </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679107859"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679107859"><span class="hs-identifier hs-var">c</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Step s Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679107859"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679107861"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-324"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679107860"><span class="annot"><span class="annottext">desc :: String
</span><a href="#local-6989586621679107860"><span class="hs-identifier hs-var hs-var">desc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Data.Text.Lazy.Encoding.Fusion.&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679107865"><span class="hs-identifier hs-var">func</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;: Invalid &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-325"></span><span>                 </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679107864"><span class="hs-identifier hs-var">kind</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; stream&quot;</span></span><span>
</span><span id="line-326"></span><span>
</span><span id="line-327"></span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#word8ToWord16"><span class="hs-identifier hs-type">word8ToWord16</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word16"><span class="hs-identifier hs-type">Word16</span></a></span><span>
</span><span id="line-328"></span><span id="word8ToWord16"><span class="annot"><span class="annottext">word8ToWord16 :: Word8 -&gt; Word16
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#word8ToWord16"><span class="hs-identifier hs-var hs-var">word8ToWord16</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word16
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span>
</span><span id="line-329"></span><span>
</span><span id="line-330"></span><span class="annot"><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#word8ToWord32"><span class="hs-identifier hs-type">word8ToWord32</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span>
</span><span id="line-331"></span><span id="word8ToWord32"><span class="annot"><span class="annottext">word8ToWord32 :: Word8 -&gt; Word32
</span><a href="Data.Text.Internal.Lazy.Encoding.Fusion.html#word8ToWord32"><span class="hs-identifier hs-var hs-var">word8ToWord32</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word32
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span>
</span><span id="line-332"></span></pre></body></html>